package Interfaces;

import java.awt.BorderLayout;
import java.awt.FlowLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import Interfaces.InterfaceMenu.Sentinela;
import Jogo.Game;

public class InterfaceGanhou {
	private int nJogador;
	private JFrame frame;
	private JPanel painel;
	private JButton OkButton;
	private JTextArea texto;

	public InterfaceGanhou(int nJogador) {
		this.nJogador = nJogador;
		frame = new JFrame();
		frame.setVisible(true);
		painel = new JPanel();
		painel.setLayout(new FlowLayout());
		texto = new JTextArea();
		texto.setText("GANHOU Jogador " + nJogador + "!");

		OkButton = new JButton("OK");

		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setResizable(false);
		frame.setSize(150, 100);
		frame.setLocation(100, 100);
		painel.add(texto);
		painel.add(OkButton);
		frame.add(painel);

		OkButton.addActionListener(new Sentinela());

	}

	public class Sentinela implements ActionListener {
		@Override
		public void actionPerformed(ActionEvent e) {
			System.exit(0);

		}

	}

	public void init() {
		
	}

}
